package com.hoopchina.ui.details;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * �����ղؽ�����ݿ�Helper��
 * 
 * @author Neusoft
 *
 */
public class DetailNewsLikeDatabaseHelper extends SQLiteOpenHelper {
    private final static String TableName = "LikeDatabase";
	private static final int VERSION = 1;
    
	public DetailNewsLikeDatabaseHelper(Context context) {
		super(context, TableName, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "CREATE TABLE IF NOT EXISTS "+TableName+" (url VARCHAR PRIMARY KEY, time VARCHAR)";
        db.execSQL(sql); 
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS " + TableName);
		onCreate(db);
	}
}
